﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web;

namespace WebHacker
{
     public class XMLHttpForm
    {
        public string ToString() {

            PropertyInfo[] pi = 
            this.GetType().GetProperties();


            String res = "";
            for(int i = 0;i < pi.Length;i++){
                
                res += HttpUtility.UrlEncode(pi[i].Name);
                res += "=";
                res += HttpUtility.UrlEncode(pi[i].GetValue(this,null).ToString());
                res += "&";
                
            }

            return res.Trim('&');
        }
    }
}
